#ifndef MYFLOAT_H
#define MYFLOAT_H
#include <limits>

/**
 * @class MyFloat
 * @brief Abstraction of float type.
 *
 * Description:
 * Abstraction of float type will be
 * useful if implementation of fixed-point arithmetic
 * to speed-up the computation
 *
 */

class MyFloat
{
public:

  /**
   * Empty Constructor
   */
  MyFloat ( );

  MyFloat (float newVal );

  /**
   * Empty Destructor
   */
  virtual ~MyFloat ( );

/**
 * @fn void set(float newVal)
 * @brief setter function
 * @param value to hold
 * @return void
 *
 */
  void set(float newVal);

/**
 * @fn float get() const
 * @brief getter function
 * @param void
 * @return value stored
 *
 */
   float get() const;

/**
 * @fn MyFloat&operator=(const MyFloat &rhs)
 * @brief assignement by copy function
 * @param right handed side value is to be copied
 * @return MyFloat
 *
 */
    MyFloat&operator=(const MyFloat &rhs) ;

/**
 * @fn MyFloat&operator+=(const MyFloat &rhs)
 * @brief assignemen by copy function
 * @param rhs is right handed side value is to be added to value stored
 * @return MyFloat
 *
 */
    MyFloat&operator+=(const MyFloat &rhs) ;

/**
 * @fn MyFloat&operator-=(const MyFloat &rhs)
 * @brief assignement by copy function
 * @param rhs is right handed side value is to be soustracted to value stored
 * @return MyFloat
 *
 */
    MyFloat&operator-=(const MyFloat &rhs) ;

/**
 * @fn MyFloat&operator*=(const MyFloat &rhs)
 * @brief assignement by copy function
 * @param rhs is right handed side value is to be multiplied to value stored
 * @return MyFloat
 *
 */
    MyFloat&operator*=(const MyFloat &rhs) ;

/**
 * @fn MyFloat&operator/=(const MyFloat &rhs)
 * @brief assignement by copy function
 * @param rhs is right handed side value is to be applied as a divisor to value stored
 * @return MyFloat
 *
 */
    MyFloat&operator/=(const MyFloat &rhs) ;


  /**
 * @fn  const MyFloat MyFloat::operator+(const MyFloat &other) const
 * @brief assignement by copy function
 * @param other is right handed side value is to be applied as a divisor to value stored
 * @return MyFloat
 *
 */
 const MyFloat operator+(const MyFloat &other) const;

  /**
 * @fn  const MyFloat MyFloat::operator*(const MyFloat &other) const
 * @brief assignement by copy function
 * @param other is right handed side value is to be applied as a multiplier to value stored
 * @return MyFloat
 *
 */
 const MyFloat operator*(const MyFloat &other) const;

 /**
 * @fn  const MyFloat MyFloat::operator/(const MyFloat &other) const
 * @brief assignement by copy function
 * @param other is handed side value is to be applied as a divisor to value stored
 * @return MyFloat
 *
 */
 const MyFloat operator/(const MyFloat &other) const;

 /**
 * @fn  const MyFloat MyFloat::operator-(const MyFloat &other) const
 * @brief assignement by copy function
 * @param right handed side value is to be applied as a substrac to value stored
 * @return MyFloat
 *
 */
 const MyFloat operator-(const MyFloat &other) const;


 /**
 * @fn  const MyFloat MyFloat::operator<(const MyFloat &other) const
 * @brief comparaison function
 * @param other is right handed side value is to be applied as a substrac to value stored
 * @return MyFloat
 *
 */
 const bool operator<(const MyFloat &other) const;

 /**
 * @fn  const MyFloat MyFloat::operator-(const MyFloat &other)
 * @brief assignement by copy function
 * @param right handed side value is to be applied as a substrac to value stored
 * @return MyFloat
 *
 */
 friend const MyFloat operator-(const MyFloat &other);


private:

  float value;  /**< value stored */


};

#endif // MYFLOAT_H
